package com.flyduck.vueshop.system.feign;

import com.flyduck.vueshop.common.core.lang.Result;
import com.flyduck.vueshop.system.vo.RemoteUserRespVO;
import com.flyduck.vueshop.system.fallback.RemoteSysUserFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>
 * SysUserFeignClient
 * </p>
 *
 * @author flyduck
 * @since 2024-07-09
 */
@FeignClient(name = "vueshop-service-system",contextId = "remoteSysUserFeignClient",fallback = RemoteSysUserFallback.class)
public interface RemoteSysUserFeignClient {

    @GetMapping("/system/remote/user/getUserByUsername")
    Result<RemoteUserRespVO> getUserByUsername(@RequestParam("username") String username);

    @GetMapping("/system/remote/user/getUserById/{id}")
    Result<RemoteUserRespVO> getUserById(@PathVariable("id") Long id);
}
